import Vue from 'vue'
import Router from 'vue-router'
import BooksList from 'components/books-list/books-list'
import Cart from 'components/cart/cart'
import UserCenter from 'components/user-center/user-center'
import Login from 'components/login/login'



Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/bookslist'
    },
    {
      path: '/bookslist',
      name: 'booksList',
      component: BooksList
    },
    {
      path: '/cart',
      name: 'cart',
      component: Cart
    },
    {
      path: '/user',
      name: 'userCenter',
      component: UserCenter
    },
    {
      path:'/login',
      name:'login',
      component:Login
    }
  ]
})
